package com.Listeners;


import android.support.v4.view.ViewPager.OnPageChangeListener;
import com.Animations.AnimUtil;
import com.Managers.FragmentManagerClass;
import com.SoapClasses.SoapUtil;
import com.activities.ActivityMain;


public class MainTabSwiperClass implements OnPageChangeListener {

    private boolean firstOnMine;

    private final ActivityMain mActivity;

    public MainTabSwiperClass(ActivityMain mActivity) {

        super();
        this.mActivity = mActivity;
    }

    @Override
    public void onPageScrolled(int position, float positionOffset, int positionOffsetPixels) {

        // TODO Auto-generated method stub

    }

    @Override
    public void onPageScrollStateChanged(int arg0) {

        // TODO Auto-generated method stub

    }

    @Override
    public void onPageSelected(int position) {

        if (position == 1) {

            SoapUtil.MENU_VIEW = SoapUtil.MODE_MINE;
            if (!firstOnMine) {
                FragmentManagerClass.aMine.loadFrom(SoapUtil.MENU_VIEW, 0);
                firstOnMine = true;
            }

       

        }
        else {
            if (position == 0) {
                SoapUtil.MENU_VIEW = SoapUtil.MODE_NEWS;
                // FragmentManagerClass.aExplore.loadFrom(SoapUtil.MENU_VIEW,
                // 0);

            }

        

        }

    }

}
